﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace VisualPoint.Controls.Commands
{
    public class DeleteActionCommand : ICommand
    {
        public DeleteActionCommand(IDeleteAction actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IDeleteAction _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.DeleteAction();
        }
    }
}
